import 'package:flutter/material.dart';
import 'package:lz_app_core/constants/app_manager.dart';
import 'package:lz_ui/kd_ui.dart';

class KDTelWidget extends StatelessWidget {
  const KDTelWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return Row(
      mainAxisAlignment: MainAxisAlignment.center,
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        TextButton(
            onPressed: () {
              // 拨打电话
              callPhone(AppManager.configModel.kfTel);
            },
            child: Text(
              "联系客服",
              style: TextStyle(fontSize: KD.font(24)),
            )),
        Text(
          "每天9:00-18:00",
          style: TextStyle(color: KDColor.place, fontSize: KD.font(24)),
        )
      ],
    );
  }

  /// 拨打电话
  callPhone(String phone) async {
    KDTel.callPhone(phone);
  }
}
